# $Id: Makefile,v 1.15 2000/03/22 18:17:42 sgust Exp $
# This is for Linux

DEVICE=\"/dev/ttyS1\"
CC = gcc
CFLAGS = -O2 -Wall -DDEFAULTDEV=$(DEVICE) -DHAVE_UNISTD_H -DHAVE_UTIME_H

all: sendfile receivefile

sendfile: sendfile.o midlevel.o lowlevel.o
	$(CC) $(CFLAGS) sendfile.o midlevel.o lowlevel.o -o sendfile

receivefile: receivefile.o midlevel.o lowlevel.o
	$(CC) $(CFLAGS) receivefile.o midlevel.o lowlevel.o -o receivefile

sendfile.o: sendfile.c misc.h
	$(CC) $(CFLAGS) sendfile.c -c -o sendfile.o

receivefile.o: receivefile.c misc.h
	$(CC) $(CFLAGS) receivefile.c -c -o receivefile.o

midlevel.o: midlevel.c lowlevel.h misc.h
	$(CC) $(CFLAGS) midlevel.c -c -o midlevel.o

lowlevel.o: lowlevel.c lowlevel.h misc.h
	$(CC) $(CFLAGS) lowlevel.c -c -o lowlevel.o

clean:
	rm -rf *.o

distclean: clean
	rm -rf sendfile receivefile

initserial:
	stty raw clocal crtscts -echo 19200 </dev/ttyS1
